package vsy.buzzwordbingo.model.impl;

import java.util.ArrayList;
import java.util.List;

import vsy.buzzwordbingo.model.Buzzword;
import vsy.buzzwordbingo.model.Link;

public class BuzzwordsBuilder {
	private List<Object> elements;
	
	public List<Link> getLinks() {
		List<Link> list = new ArrayList<Link>();
		for (Object elem : elements) {
			if (elem instanceof LinkBuilder) {
				list.add(((LinkBuilder)elem).createLink());
			}
		}
		return list;
	}
	
	public List<Buzzword> getBuzzwords() {
		List<Buzzword> list = new ArrayList<Buzzword>();
		for (Object elem : elements) {
			if (elem instanceof BuzzwordBuilder) {
				list.add(((BuzzwordBuilder)elem).createBuzzword());
			}
		}
		return list;
	}
}
